package com.framework.admin.schedule.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.framework.admin.schedule.entity.SysJob;
import com.framework.admin.schedule.param.JobParam;
import org.mapstruct.Mapper;

@Mapper
public interface JobMapper extends BaseMapper<SysJob> {
    Page<SysJob> selectJobList(Page pageable, JobParam param);

    /**
     * 批量删除调度任务信息
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    int deleteJobByIds(Long[] ids);

    /**
     * 修改调度任务信息
     *
     * @param job 调度任务信息
     * @return 结果
     */
    int updateJob(SysJob job);

    /**
     * 新增调度任务信息
     *
     * @param job 调度任务信息
     * @return 结果
     */
    //@Options(useGeneratedKeys = true, keyProperty = "id", keyColumn = "id")
    int insertJob(SysJob job);
}
